# Maintainer: Oscar Fuentes <ofv@wanadoo.es>

_realname=ducible
pkgbase=mingw-w64-${_realname}-git
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
pkgver=r208.956976c
pkgrel=1
pkgdesc="A tool to make Windows builds reproducible."
arch=('any')
url="https://github.com/jasonwhite/ducible"
license=("MIT")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "git" "python")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
source=("${_realname}"::"git+https://github.com/jasonwhite/ducible.git")
sha256sums=('SKIP')

pkgver() {
  cd "${_realname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/${_realname}"
  make
}

package() {
  cd "${srcdir}/${_realname}"
  mkdir -p "$pkgdir"${MINGW_PREFIX}/bin
  cp ducible.exe "$pkgdir"${MINGW_PREFIX}/bin
}
